package com.sky.mapper;

import com.sky.dto.FormFieldConfigDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FormFieldConfigMapper {

    @Select("<script>" +
            "SELECT * FROM form_field_config WHERE template_id IN " +
            "<foreach item='id' collection='templateIds' open='(' separator=',' close=')'>" +
            "#{id}" +
            "</foreach>" +
            "</script>")
    List<FormFieldConfigDTO> selectFieldsByTemplateIds(@Param("templateIds") List<Long> templateIds);
}